1. Field of the Invention
The present invention relates to an apparatus capable of generating a form including a two-dimensional code image, a control method, a program, and a storage medium.
2. Description of the Related Art
A technique is known by which original data is acquired from a coded image. According to this technique, the original data is encoded into a coded image, the coded image is printed on a sheet of paper, and the original data is acquired by scanning the coded image with a reader.
As a method to print original data on a sheet of paper using encoded original data, two-dimensional codes such as a bar code for commodity management or a QR code and a digital watermark are known. All of these codes and marks will be referred to as “two-dimensional code images” in the context of the present specification.
Suppose a user needs to create a form including a two-dimensional code image, there is a form creation application which has a function of inserting an image in the form. Thus, it is natural for the user to create a form that includes a two-dimensional code image using a form creation application which has a function of inserting a two-dimensional code image.
A layout of a two-dimensional code image is limited by an overall layout of a form. This is because the two-dimensional code image needs to be inserted in a manner so that the two-dimensional code image does not overlap an image in an area other than the two-dimensional code image. This is especially apparent in a case where the layout of the form is fixed. This limitation of the layout will be described below referring to, as an example, a layout of a bank transfer statement which is a transfer record forwarded from a bank to a client company.
In a form layout illustrated in FIG. 1, a two-dimensional code image display area 103 configured to display encoded content data is arranged in the middle of the layout so that a person in charge in a client company can easily retrieve content data contained in the form when the person receives the form.
Other fields that make up a bank transfer statement 100 are a creation date field 101 where a date and time of creation of the form is input, a company name field 102 where a name of a client company which receives the form is input, and a detail information field 104 where each bank transfer processing result is listed. The date and time, company name, and bank transfer processing results which are input in these fields 101, 102, and 104, are examples of and referred to as content data in the context of the present specification.
A horizontal length of the detail information field 104 and a horizontal length of a two-dimensional code image display area 103 are fixed but their vertical length is changeable. Accordingly, if a number of items that are input in the detail information field 104 increases, a second page of the form is created. In this case, as shown in a bank transfer statement 110, a latter part of the information input in the detail information field 104 is subsequently stated on the next page.
On the other hand, a vertical length of the two-dimensional code image display area 103 which is changeable, cannot be changed without limit just because the number of items which are input into the detail information field 104 is increased. This is because it is desired that a two-dimensional code image is arranged on the first page as far as possible. If the two-dimensional code image is arranged only on the first page, the user can acquire the content data contained in the form simply by scanning the two-dimensional code image on the first page.
As described above, a certain measure needs to be taken in arranging the two-dimensional code image surely within a form under a constraint of the overall layout. A number of attempts have been made so far for that purpose.
For example, Japanese Patent Application Laid-Open No. 2000-076372 discusses a method in which original data is divided into a plurality of pieces so that an amount of each piece of data is small when the data is encoded.
In addition, Japanese Patent Application Laid-Open No. 2000-076372 discusses that a two-dimensional code image that has a fixed horizontal and vertical size has a limit on the amount of information to be contained. If the amount of data in the original data is less than the maximum data amount, the original data is encoded and one two-dimensional bar code is generated.
On the other hand, if the amount of data in the original data exceeds the maximum data amount, the original data is divided into a plurality of pieces so that each piece of data is within the volume limit. After then, the divided pieces of data are encoded and a plurality of two-dimensional code images which correspond to the divided pieces of data are generated.
According to the technique discussed in Japanese Patent Application Laid-Open No. 2000-076372, if the amount of data in the original data exceeds the maximum data amount, the original data is divided into a plurality of pieces and encoded to generate a two-dimensional bar code. Thus, when a user inputs an instruction to adjust the size of the two-dimensional code image, the above-described original data needs to be divided again to generate a new two-dimensional bar code. However, encoding of data requires considerable processing time, therefore, the user may get frustrated when data needs to be encoded once again.
Therefore, there is a strong demand for a form editing apparatus which is capable of displaying a two-dimensional code image in a two-dimensional code image display area without regenerating the two-dimensional code image from the original data even if a horizontal size or a vertical size of the two-dimensional code image display area is changed in response to a request from the user.